/*
 * @Descripttion: 
 * @version: 
 * @Author: chenbolin@msn.cn
 * @Date: 2021-05-20 10:35:50
 * @LastEditors: chenbolin@msn.cn
 * @LastEditTime: 2023-06-07 17:55:31
 */
#ifndef HAL_UART_H
#define HAL_UART_H

#include "HalCtype.h"

typedef void (* HalUartDataRecv_cb)(uint8_t *data, uint16_t length);

typedef struct
{
    bool dmaRxEnable;
    uint8_t *dmaBuff;
    uint32_t bufflen;
    uint32_t baudrate;
    HalUartDataRecv_cb recvCb;
}HalUartConfig_t;

void HalUartInitialize(void);
void HalUartConfig(uint8_t uart, HalUartConfig_t *config);
void HalUartWrite(uint8_t uart, const uint8_t *data, uint16_t len);

#endif


